<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>QCNSim: QcnSimTest/QcnSimTest.cpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">QCNSim
   </div>
   <div id="projectbrief">Simulator for Quake-Catcher Network</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_3e989efef406e88ca8d8bde4ec47b67f.html">QcnSimTest</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">QcnSimTest.cpp File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;../gtest/include/gtest/gtest.h&quot;</code><br/>
<code>#include &quot;<a class="el" href="_event_8h_source.html">../QcnSim/Event.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="_message_8h_source.html">../QcnSim/Message.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="_scheduler_8h_source.html">../QcnSim/Scheduler.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="_token_8h_source.html">../QcnSim/Token.h</a>&quot;</code><br/>
<code>#include &lt;iostream&gt;</code><br/>
</div>
<p><a href="_qcn_sim_test_8cpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a778993ea560e454bcfdd70559e06802d"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_qcn_sim_test_8cpp.html#a778993ea560e454bcfdd70559e06802d">TEST</a> (MessageTest, SetAndGetContents)</td></tr>
<tr class="separator:a778993ea560e454bcfdd70559e06802d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aad628e1d07e753dbbf741eb575778ad3"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_qcn_sim_test_8cpp.html#aad628e1d07e753dbbf741eb575778ad3">TEST</a> (<a class="el" href="class_token_test.html">TokenTest</a>, Construction)</td></tr>
<tr class="separator:aad628e1d07e753dbbf741eb575778ad3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a778993ea560e454bcfdd70559e06802d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TEST </td>
          <td>(</td>
          <td class="paramtype">MessageTest&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">SetAndGetContents&#160;</td>
          <td class="paramname">&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section author"><dt>Author</dt><dd>Marcos Portnoi </dd></dl>
<dl class="section date"><dt>Date</dt><dd>June 2013</dd></dl>
<dl class="section copyright"><dt>Copyright</dt><dd>Copyright (C) 2013 University of Delaware. </dd>
<dd>
QCNSim uses elements of TARVOS simulator, Copyright (C) 2005, 2006, 2007 Marcos Portnoi. </dd></dl>
<dl class="section user"><dt></dt><dd>This file is part of QCNSim. QCNSim is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.<br/>
 QCNSim is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.<br/>
 You should have received a copy of the GNU Lesser General Public License along with QCNSim. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>. </dd></dl>

<p>Definition at line <a class="el" href="_qcn_sim_test_8cpp_source.html#l00066">66</a> of file <a class="el" href="_qcn_sim_test_8cpp_source.html">QcnSimTest.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;                                     {</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;    <a class="code" href="class_message.html">Message</a> message1;</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;    <a class="code" href="class_message.html">Message</a> message2;</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    std::string contents1(<span class="stringliteral">&quot;This is contents 1&quot;</span>);</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;    std::string contents2(<span class="stringliteral">&quot;This is contents 2&quot;</span>);</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    message1.<a class="code" href="class_message.html#ac77c51602c29d229fde42a2a1ad6ea34">setContents</a>(std::string(<span class="stringliteral">&quot;This is contents 1&quot;</span>));</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    message2.<a class="code" href="class_message.html#ac77c51602c29d229fde42a2a1ad6ea34">setContents</a>(std::string(<span class="stringliteral">&quot;This is contents 2&quot;</span>));</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;    EXPECT_EQ(contents1, message1.<a class="code" href="class_message.html#a5f7632c2bf96a97af1c9266c27b2b6b8">getContents</a>());</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;    EXPECT_EQ(contents2, message2.<a class="code" href="class_message.html#a5f7632c2bf96a97af1c9266c27b2b6b8">getContents</a>());</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;  </div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;}</div>
<div class="ttc" id="class_message_html_ac77c51602c29d229fde42a2a1ad6ea34"><div class="ttname"><a href="class_message.html#ac77c51602c29d229fde42a2a1ad6ea34">Message::setContents</a></div><div class="ttdeci">void setContents(const std::string &amp;contents)</div><div class="ttdef"><b>Definition:</b> <a href="_message_8cpp_source.html#l00048">Message.cpp:48</a></div></div>
<div class="ttc" id="class_message_html"><div class="ttname"><a href="class_message.html">Message</a></div><div class="ttdoc">Message class. </div><div class="ttdef"><b>Definition:</b> <a href="_message_8h_source.html#l00032">Message.h:32</a></div></div>
<div class="ttc" id="class_message_html_a5f7632c2bf96a97af1c9266c27b2b6b8"><div class="ttname"><a href="class_message.html#a5f7632c2bf96a97af1c9266c27b2b6b8">Message::getContents</a></div><div class="ttdeci">std::string getContents() const </div><div class="ttdef"><b>Definition:</b> <a href="_message_8cpp_source.html#l00039">Message.cpp:39</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="aad628e1d07e753dbbf741eb575778ad3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TEST </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_token_test.html">TokenTest</a>&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Construction&#160;</td>
          <td class="paramname">&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="_qcn_sim_test_8cpp_source.html#l00080">80</a> of file <a class="el" href="_qcn_sim_test_8cpp_source.html">QcnSimTest.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;                              {</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;    std::shared_ptr&lt;Entity&gt; entity = NULL;</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    <a class="code" href="class_token.html">Token</a> token = <a class="code" href="class_token.html">Token</a>(0, 0, entity);</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;    EXPECT_EQ(contents1, message1.getContents());</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;    EXPECT_EQ(contents2, message2.getContents());</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;  </div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;}</div>
<div class="ttc" id="class_token_html"><div class="ttname"><a href="class_token.html">Token</a></div><div class="ttdoc">Token class. </div><div class="ttdef"><b>Definition:</b> <a href="_token_8h_source.html#l00044">Token.h:44</a></div></div>
</div><!-- fragment -->
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Nov 14 2013 11:18:22 for QCNSim by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.5
</small></address>
</body>
</html>
